import express from "express";
import bodyParser from "body-parser";
import Configuration from "brewstand";
import { Config } from "./src/objects/Config";
import { ListingRoute } from "./src/routes/listingRoute";

const app = express();
const config = new Configuration<Config>().getConfig();

app.use(bodyParser.urlencoded({
    extended: false
}));

app.use('/', new ListingRoute(config).getRoute());

app.listen(config.port);
console.debug('Server started at ' + config.port);
